package com.tea.tl.controller;

import com.tea.common.dto.TeaAddDto;
import com.tea.common.vo.R;
import com.tea.tl.service.intf.TeaService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/server/tealeaf/")
public class TeaController {
    @Resource
    private TeaService service;

    @PostMapping("add.do")
    public R add(@RequestBody TeaAddDto dto){
        return service.add(dto);
    }
    @GetMapping("select.do")
    public R select(@RequestParam int tgid){
        return service.select(tgid);
    }
}
